{* DTD Selection Information: http://hsivonen.iki.fi/doctype/ *}
{* Quirks Mode DTD *}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
{* Almost Standards Mode DTD *}
{* <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> *}
<html>
<head>
<!-- compliance patch for microsoft browsers -->
<!--[if lt IE 7]>
<script src="{$base_dir}index.php/ie7/ie7-standard-p.js" type="text/javascript">
</script>
<![endif]-->
<!--generated from main/general_list.html -->

{if $me->get_id() > 0}
{ajax action="setupAJAX"}
{/if}

{literal}
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL,width,height) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=' + width + ',height=' + height + ',left = 400,top = 150');");
}

{/literal}
var serverTimeOffset = {php}echo (date('Z')/60)*-1{/php};
{literal}
var d = new Date();
var timeZoneAdjust = 0;
if (d.getTimezoneOffset() != serverTimeOffset) {
	timeZoneAdjust = d.getTimezoneOffset() - serverTimeOffset;
}
</script>
 
{/literal}
{if !noOverlib}
{popup_init src="`$base_dir`js/overlib.js"}
{/if}
{*<link href="{$base_dir}celini.css" rel="stylesheet" type="text/css">*}
<link href="{$base_dir}js/cal/calendar-blue2.css" rel="stylesheet" type="text/css">
{*<link href="{$base_dir}css/clearhealth.css" rel="stylesheet" type="text/css">*}
<link href="{$base_dir}css/suggest.css" rel="stylesheet" type="text/css">
<link href="{$base_dir}css/mobile.css" rel="stylesheet" type="text/css">
{if $extra_css}
{foreach from=$extra_css item=css_file}
<link href="{$base_dir}css{$css_file}" rel="stylesheet" type="text/css" />
{/foreach}
{/if}
{if $menu_group === "default"}
	{assign var="section_name" value="Calendar"}
{/if}
{if $menu_group === "patient"}
	{assign var="section_name" value="Patient"}
{/if}
{if $menu_group === "billing"}
	{assign var="section_name" value="Billing"}
{/if}
{if $menu_group === "admin"}
	{assign var="section_name" value="Administration"}
{/if}
<title>ClearHealth : {$section_name}{if $menu_current.title} : {$menu_current.title}{/if}</title>
</head>
<body>
	<div id="header" class="section{$section_name}">
	{if $me->get_id() > 0}
	<div id="sections">
		<div class="section" id="username">{translate p1=$me->get_username()}User: %s{/translate}</div>
		{if $sec_obj->check("usage","main_calendar")}
		<a {if $menu_group == "default"}class="selected"{/if} href="{$base_uri}index.php/main/calendarDisplay/day">{translate}Cal{/translate}</a>

		{/if}
		{if $sec_obj->check("usage","main_patient")}
		<a href="{if $selectedPatient}{$base_uri}index.php/main/PatientDashboard/view/{$selectedPatient->get('person_id')}
{else}{$base_uri}index.php/main/PatientFinder/Find{/if}">Pnt</a>
		<a href="{$patient_action}" {if $menu_group == "patient"}class="selected"{/if}>{translate}Pnt{/translate}</a>
		{/if}
		{if $sec_obj->check("usage","main_billing")}
		<a {if $menu_group == "billing"}class="selected"{/if} href="{$base_dir}index.php/main/MasterAccountHistory/View">{translate}Bill{/translate}</a>
		{/if}
		{if $sec_obj->check("usage","main_admin")}
		<a href="{$base_dir}index.php/main/admin" {if $menu_group == "admin"}class="selected"{/if}>{translate}Admin{/translate}</a>
		{/if}

		{if $menu_group == "patient"}
			{if $selectedPatient}
			<div id="selectedItem"><a 
					href="{link action="view" controller="PatientDashboard" defaultArg=$selectedPatient->get("person_id")}">{$selectedPatient->get('last_name')}, {$selectedPatient->get('first_name')|truncate:1:"":true}</a> #{$selectedPatient->get('record_number')}</div>
			{/if}
		{/if}
		{include file="main/mobile_menu.html"}
	</div>
	{/if}
</div>
<div id="body">
	{if is_object($messages)}
	{$messages->render()}
	{elseif is_array($messages)}
		{foreach from=$messages item=message}
			{$message}<br>
		{/foreach}
	{elseif strlen($messages) >0}
	{$messages}
	{/if}
	{$display}
</div>
</body>
</html>
